home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1998 June / SGI Freeware 1998 June.iso / dist / fw_UMINNgopher.idb / usr / freeware / src / gopher_1.12 / gopherd / site.h.z / site.h
C/C++ Source or Header  |  1997-09-09  |  2KB  |  70 lines

  1. /********************************************************************
  2.  * $Author: drich $
  3.  * $Revision: 1.1 $
  4.  * $Date: 1995/10/03 04:08:42 $
  5.  * $Source: /proj/freeware1.0/gopher1.12/src/gopherd/RCS/site.h,v $
  6.  * $Status: $
  7.  *
  8.  * Paul Lindner, University of Minnesota CIS.
  9.  *
  10.  * Copyright 1991, 1992 by the Regents of the University of Minnesota
  11.  * see the file "Copyright" in the distribution for conditions of use.
  12.  *********************************************************************
  13.  * MODULE: site.h
  14.  * Main functions for the gopher client
  15.  *********************************************************************
  16.  * Revision History:
  17.  * $Log: site.h,v $
  18.  * Revision 1.1  1995/10/03  04:08:42  drich
  19.  * gopher 1.2 check-in
  20.  *
  21.  * Revision 1.1  1992/12/10  23:13:27  lindner
  22.  * gopher 1.1 release
  23.  *
  24.  *
  25.  *********************************************************************/
  26.  
  27. /*
  28.  * Definitions for security and hostname access
  29.  */
  30.  
  31. #ifndef SITE_H
  32. #define SITE_H
  33.  
  34. #include "STRstring.h"
  35. #include "boolean.h"
  36. #include "DAarray.h"
  37.  
  38. typedef int Accesslevel;
  39. #define ACC_BROWSE (1<<0)
  40. #define ACC_READ   (1<<1)
  41. #define ACC_SEARCH (1<<2)
  42. #define ACC_UNKNOWN (-1)
  43.  
  44. #define ACC_FULL (ACC_BROWSE | ACC_READ | ACC_SEARCH)
  45.  
  46. struct Site_struct {
  47.      String       *domain;
  48.      Accesslevel  Level;
  49.      boolean      isnum;
  50. };
  51.  
  52. typedef struct Site_struct Site;
  53. typedef DynArray SiteArray;
  54.  
  55. #define SiteArrgetEntry(a,b) (Site *)(DAgetEntry((DynArray*)a,b))
  56. #define SiteArrDestroy(a) (DAdestroy(a))
  57. #define SiteArrPush(a,b) (DApush((a),(b)))
  58. #endif
  59.  
  60. /**  Functions declared in site.c **/
  61. SiteArray       *SiteArrayNew();
  62. void            SiteArrayAdd( /* sitearr, name, Level */);
  63. Accesslevel     SiteAccess(/* sitearr, name */);
  64.  
  65. boolean         SiteArrCanRead(/* */);
  66. boolean         SiteArrCanBrowse(/* */);
  67. boolean         SiteArrCanSearch(/* */);
  68.  
  69. boolean         SiteProcessLine(/* sitearr, inputline, DefAccess */);
  70.